package com.abstractfactory;

/**
 * @author sailor wang
 * @date 2018/8/31 上午10:52
 * @description
 */
public class FactoryProducer {

    public static AbstractFactory getFactory(String type){
        if ("shape".equals(type.toLowerCase())){
            return new ShapeFactory();
        }else if ("color".equals(type)){
            return new ColorFactory();
        }
        return null;
    }
}